var ___temp = Class({
	logoElements:{},
	actives: {},
	initialize: function() {
		this.logoElements = $$('#logo *');
	},
	runningOpacity: function(elements, op, time1, time2, time3) {
		if (!op) op = 0.5;
		if (this.actives.ro) return;
		var fxs = [
		    {
				opacity: op
			},
			{
				opacity: 1
			}
		];
		
		if (!time1) time1 = 100;
		if (!time2) time2 = 50;
		if (!time3) time3 = 10000;

		var roFXobj = {
				'elements': elements,
				'opacity': op,
				'time1': time1,
				'time2': time2,
				'time3': time3,
				active: false,
				stop: function() {
					this.active = false;
				}
			};
		roFXobj.active = true;
		var fx = new Fx.Multi(elements, time1);
		fx.addEvent('complete', function() {
			if (roFXobj.active) {
				var mmm = this;
				setTimeout(function() {
					if (roFXobj.active) {
						mmm.start(fxs, time2);
					}
				}, time2*2);
			}
		});
		if (time3 > 0) setTimeout(function() {fx.removeEvents('complete');}, time3);
		fx.start(fxs, time2);
		return roFXobj;
	}, 
	runLogo: function(time) {
		time = (time || -1);
		return this.runningOpacity(this.logoElements, 0.5, 100, 50, time);
	},
	redLogo: function() {
		var logo = $('logo');
		var fx = new Fx.Tween($('logo'), {duration: 'short'});
		fx.start('color', logo.getStyle('color'), '#990000');
		setTimeout("Xendri.Fx.blackLogo();", 500);
	},
	grayLogo: function() {
		var logo = $('logo');
		var fx = new Fx.Tween($('logo'), {duration: 'short'});
		fx.start('color', logo.getStyle('color'), '#ccc');
	},	
	greenLogo: function() {
		var logo = $('logo');
		var fx = new Fx.Tween($('logo'), {duration: 'short'});
		fx.start('color', logo.getStyle('color'), '#009900');
		setTimeout("Xendri.Fx.blackLogo();", 500);
	},
	blackLogo: function() {
		var logo = $('logo');
		var fx = new Fx.Tween($('logo'));
		fx.start('color', logo.getStyle('color'), '#000000');
	},	
});

Xendri.Fx = new ___temp();
